package learning.groovy.bean

import static org.junit.Assert.*

import groovy.util.GroovyTestCase

class PersionTest extends GroovyTestCase {

	void test001(){
		def persion1=new Persion()
		persion1.name='gg'
		persion1.age=22
		println persion1
		
		assertEquals(persion1.toString(), 'gg,22')
		
		def persion2=new Persion(['name':'gg','age':22])
		println persion2
		
		assertEquals(persion2.toString(), 'gg,22')
		
		assertEquals(persion1.toString(), persion2.toString())
		
		def persion3=new Persion('name':'gg','age':22)
		println persion3
	}
}
